<!--<ol>

<?php
foreach ($month_list as $item)
{
	$month_string = $item->month;
	$year_month = explode('-', $month_string);
	echo '<li><a href="'.base_url().'index.php/lib/month/'.$year_month[0].'/'.$year_month[1].'">'.$month_string.'</a></li>';
}
?>
</ol>-->
<div class="container row library-container">
	<div class="span3">
		<ul class="nav nav-tabs nav-stacked library-nav">
			<li <?php $is_today = $category == Variable::LIST_TODAY; echo $is_today ? 'class="active"' : ''?>>
			<?php echo anchor('lib/today', '今天<i class="'.($is_today ? '' : 'icon-white ').'icon-chevron-right pull-right"></i>')?>
			</li>
			<li <?php $is_yesterday = $category == Variable::LIST_YESTERDAY; echo $is_yesterday ? 'class="active"' : ''?>>
			<?php echo anchor('lib/yesterday', '昨天<i class="'.($is_yesterday ? '' : 'icon-white ').'icon-chevron-right pull-right"></i>')?>
			</li>
			<li <?php $is_week = $category == Variable::LIST_WEEK; echo $is_week ? 'class="active"' : ''?>>
			<?php echo anchor('lib/week', '本周<i class="'.($is_week ? '' : 'icon-white ').'icon-chevron-right pull-right"></i>')?>
			</li>
			<li <?php $is_month = $category == Variable::LIST_MONTH; echo $is_month ? 'class="active"' : ''?>>
			<?php echo anchor('lib/month', '本月<i class="'.($is_month ? '' : 'icon-white ').'icon-chevron-right pull-right"></i>')?>
			</li>
		</ul>
		<ul class="nav nav-tabs nav-stacked library-nav" id="allTag">
		<?php 
			$is_no_category_tag = $category == Variable::LIST_TAG && $tag_id == 0;
		?>
			<li <?php echo $is_no_category_tag ? 'class="active"' : ''?>>
			<?php 
				echo anchor('lib/tag/0', '未分类<i class="'.($is_no_category_tag ? '' : 'icon-white').' icon-chevron-right pull-right"></i>');
			?>
			</li>		
		<?php 
			foreach ($tag_list as $tag)
			{
				if(strlen($tag->tagName.'') == 0) continue;
				echo '<li tagId="'.$tag->tagId.'" '.($tag_id == $tag->tagId ? 'class="active tag'.$tag->tagId.'"' : 'class="tag'.$tag->tagId.'"').'>'.anchor('lib/tag/'.$tag->tagId, strip_tags($tag->tagName).'<i class="'.($tag_id == $tag->tagId ? '' : 'icon-white ').'icon-chevron-right pull-right"></i>').'</li>';
				//echo anchor('tag/detail/'.$tag->tagId, '编辑');
			}
		?>
		</ul>
		<ul class="nav nav-tabs nav-stacked library-nav">
			<li><a data-toggle="modal" href="#" id="addTag"><i class=" icon-plus"></i>新建分类</a>
			</li>
		</ul>
	</div>